home *** CD-ROM | disk | FTP | other *** search
/ PC World 2007 December / PCWorld_2007-12_cd.bin / domacnost a kancelar / autoit / autoit-v3-setup.exe / Examples / Helpfile / include-once.au3 < prev    next >
Text File  |  2007-09-08  |  449b  |  19 lines

  1. ;;; LIBRARY.AU3 ;;;
  2. #include-once
  3.  
  4. Func myFunc()
  5.     MsgBox(0,"", "Hello from library.au3")
  6. EndFunc
  7.  
  8.  
  9. ;;; SCRIPT.AU3 ;;;
  10. #include "Library.au3"
  11. #include "Library.au3"  ;throws an error if #include-once was not used
  12.  
  13. MsgBox(0, "Example", "This is from 'script.au3' file")
  14. myFunc()
  15. Exit
  16.  
  17. ; Running script.au3 will output the two message boxes:
  18. ; one saying "This is from 'script.au3' file" 
  19. ; and another saying "Hello from library.au3"